<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>孕育宝典 - 营养追踪</title>
        <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css" />
        <style>
            body {
                font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
                background-color: #f5f5f5;
                color: #333333;
                margin: 0;
                padding: 0;
            }
            .device-container {
                width: 390px;
                height: 844px;
                overflow: hidden;
                position: relative;
                background-color: #ffffff;
            }
            .status-bar {
                height: 44px;
                background-color: #ffffff;
                display: flex;
                justify-content: space-between;
                align-items: center;
                padding: 0 20px;
                font-size: 14px;
                font-weight: 600;
            }
            .header {
                background-color: #ffffff;
                padding: 12px 16px 8px;
                display: flex;
                justify-content: space-between;
                align-items: center;
                border-bottom: 1px solid #f0f0f0;
            }
            .nav-bar {
                height: 60px;
                background-color: #ffffff;
                position: absolute;
                bottom: 0;
                width: 100%;
                display: flex;
                justify-content: space-around;
                align-items: center;
                border-top: 1px solid #f0f0f0;
            }
            .nav-item {
                display: flex;
                flex-direction: column;
                align-items: center;
                color: #666666;
                font-size: 10px;
            }
            .nav-item.active {
                color: #ff9fb5;
            }
            .main-content {
                height: calc(844px - 44px - 60px - 56px);
                overflow-y: auto;
                padding: 16px;
                background-color: #f9f9f9;
            }
            .card {
                background-color: #ffffff;
                border-radius: 12px;
                padding: 16px;
                box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
                margin-bottom: 16px;
            }
            .card-title {
                font-size: 16px;
                font-weight: 600;
                color: #333;
                margin-bottom: 12px;
                display: flex;
                align-items: center;
            }
            .card-title i {
                margin-right: 8px;
                color: #ff9fb5;
            }
            .form-group {
                margin-bottom: 16px;
            }
            .form-label {
                display: block;
                font-size: 14px;
                font-weight: 500;
                color: #333;
                margin-bottom: 6px;
            }
            .button-primary {
                background-color: #ff9fb5;
                color: white;
                border: none;
                border-radius: 8px;
                padding: 12px 0;
                font-size: 16px;
                font-weight: 500;
                width: 100%;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            .button-secondary {
                background-color: #f5f5f5;
                color: #666;
                border: 1px solid #ddd;
                border-radius: 8px;
                padding: 12px 0;
                font-size: 16px;
                font-weight: 500;
                width: 100%;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            .tabs {
                display: flex;
                background-color: #f5f5f5;
                border-radius: 8px;
                padding: 4px;
                margin-bottom: 16px;
            }
            .tab {
                flex: 1;
                text-align: center;
                padding: 8px 0;
                font-size: 14px;
                border-radius: 6px;
                cursor: pointer;
                transition: all 0.2s ease;
            }
            .tab.active {
                background-color: #fff;
                color: #ff9fb5;
                box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            }
            .progress-container {
                height: 6px;
                background-color: #f0f0f0;
                border-radius: 3px;
                margin: 8px 0;
                overflow: hidden;
            }
            .progress-bar {
                height: 100%;
                background-color: #ff9fb5;
                border-radius: 3px;
            }
        </style>
    </head>
    <body>
        <div class="device-container">
            <!-- iOS状态栏 -->
            <div class="status-bar">
                <span>9:41</span>
                <div class="flex items-center">
                    <i class="fas fa-signal mr-1"></i>
                    <i class="fas fa-wifi mr-1"></i>
                    <i class="fas fa-battery-full"></i>
                </div>
            </div>

            <!-- 页面头部 -->
            <div class="header">
                <div class="flex items-center">
                    <i class="fas fa-arrow-left mr-4"></i>
                    <h1 class="text-lg font-medium">营养追踪</h1>
                </div>
                <div class="flex gap-3">
                    <i class="fas fa-plus-circle"></i>
                </div>
            </div>

            <!-- 主内容区 -->
            <div class="main-content">
                <!-- 日期选择器 -->
                <div class="card">
                    <div class="flex justify-between items-center">
                        <button class="p-2 text-gray-400">
                            <i class="fas fa-chevron-left"></i>
                        </button>
                        <div class="text-center">
                            <div class="text-base font-medium">2023年7月20日</div>
                            <div class="text-xs text-gray-500">孕期24周 · 星期四</div>
                        </div>
                        <button class="p-2 text-gray-400">
                            <i class="fas fa-chevron-right"></i>
                        </button>
                    </div>
                </div>

                <!-- 营养总览 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-chart-pie"></i>
                        <span>今日营养总览</span>
                    </div>

                    <!-- 卡路里进度 -->
                    <div class="flex justify-between items-center mb-1">
                        <div class="text-sm font-medium">卡路里</div>
                        <div class="text-sm">1450 / 2000 kcal</div>
                    </div>
                    <div class="progress-container mb-4">
                        <div class="progress-bar" style="width: 72.5%"></div>
                    </div>

                    <!-- 营养素详情 -->
                    <div class="grid grid-cols-3 gap-3 mb-2">
                        <div class="bg-gray-50 p-3 rounded-lg text-center">
                            <div class="text-xs text-gray-500">蛋白质</div>
                            <div class="font-medium mt-1">65g</div>
                            <div class="text-xs text-green-500">达标</div>
                        </div>
                        <div class="bg-gray-50 p-3 rounded-lg text-center">
                            <div class="text-xs text-gray-500">碳水</div>
                            <div class="font-medium mt-1">180g</div>
                            <div class="text-xs text-green-500">达标</div>
                        </div>
                        <div class="bg-gray-50 p-3 rounded-lg text-center">
                            <div class="text-xs text-gray-500">脂肪</div>
                            <div class="font-medium mt-1">45g</div>
                            <div class="text-xs text-yellow-500">偏低</div>
                        </div>
                    </div>

                    <!-- 维生素矿物质 -->
                    <div class="bg-blue-50 p-3 rounded-lg">
                        <div class="flex justify-between mb-2">
                            <div class="text-xs font-medium text-blue-800">孕期必需营养素</div>
                            <div class="text-xs text-blue-800">3/5 达标</div>
                        </div>

                        <div class="space-y-2">
                            <div>
                                <div class="flex justify-between text-xs mb-1">
                                    <span class="text-gray-600">叶酸</span>
                                    <span class="text-green-600">420μg / 400μg</span>
                                </div>
                                <div class="progress-container" style="height: 4px">
                                    <div class="progress-bar bg-green-500" style="width: 105%"></div>
                                </div>
                            </div>

                            <div>
                                <div class="flex justify-between text-xs mb-1">
                                    <span class="text-gray-600">铁</span>
                                    <span class="text-red-500">12mg / 28mg</span>
                                </div>
                                <div class="progress-container" style="height: 4px">
                                    <div class="progress-bar bg-red-500" style="width: 43%"></div>
                                </div>
                            </div>

                            <div>
                                <div class="flex justify-between text-xs mb-1">
                                    <span class="text-gray-600">钙</span>
                                    <span class="text-yellow-500">850mg / 1000mg</span>
                                </div>
                                <div class="progress-container" style="height: 4px">
                                    <div class="progress-bar bg-yellow-500" style="width: 85%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 膳食记录 -->
                <div class="card">
                    <div class="card-title">
                        <i class="fas fa-utensils"></i>
                        <span>今日膳食记录</span>
                    </div>

                    <!-- 膳食记录标签页 -->
                    <div class="tabs">
                        <div class="tab active">早餐</div>
                        <div class="tab">午餐</div>
                        <div class="tab">晚餐</div>
                        <div class="tab">加餐</div>
                    </div>

                    <!-- 食物列表 -->
                    <div class="divide-y divide-gray-100">
                        <div class="py-3 flex justify-between items-center">
                            <div class="flex items-center">
                                <div class="w-10 h-10 bg-orange-100 rounded-lg flex items-center justify-center mr-3">
                                    <i class="fas fa-bread-slice text-orange-400"></i>
                                </div>
                                <div>
                                    <div class="text-sm font-medium">全麦面包</div>
                                    <div class="text-xs text-gray-500">两片 (80g)</div>
                                </div>
                            </div>
                            <div class="text-sm">180 kcal</div>
                        </div>

                        <div class="py-3 flex justify-between items-center">
                            <div class="flex items-center">
                                <div class="w-10 h-10 bg-yellow-100 rounded-lg flex items-center justify-center mr-3">
                                    <i class="fas fa-egg text-yellow-400"></i>
                                </div>
                                <div>
                                    <div class="text-sm font-medium">水煮蛋</div>
                                    <div class="text-xs text-gray-500">一只 (50g)</div>
                                </div>
                            </div>
                            <div class="text-sm">70 kcal</div>
                        </div>

                        <div class="py-3 flex justify-between items-center">
                            <div class="flex items-center">
                                <div class="w-10 h-10 bg-blue-100 rounded-lg flex items-center justify-center mr-3">
                                    <i class="fas fa-glass-whiskey text-blue-400"></i>
                                </div>
                                <div>
                                    <div class="text-sm font-medium">酸奶</div>
                                    <div class="text-xs text-gray-500">一杯 (200ml)</div>
                                </div>
                            </div>
                            <div class="text-sm">120 kcal</div>
                        </div>
                    </div>

                    <button
                        class="mt-4 w-full py-2.5 text-center text-sm border border-dashed border-gray-300 rounded-lg text-gray-500"
                    >
                        <i class="fas fa-plus mr-1"></i> 添加食物
                    </button>
                </div>

                <!-- 建议食物 -->
                <div class="card mb-8">
                    <div class="card-title">
                        <i class="fas fa-lightbulb"></i>
                        <span>营养建议</span>
                    </div>

                    <!-- 营养不足提示 -->
                    <div class="bg-yellow-50 p-3 rounded-lg mb-4">
                        <div class="flex items-start">
                            <i class="fas fa-exclamation-circle text-yellow-500 mt-0.5 mr-2"></i>
                            <div>
                                <div class="text-sm font-medium text-yellow-800">铁元素摄入不足</div>
                                <div class="text-xs text-yellow-700 mt-1">
                                    孕中期需要增加铁的摄入，建议多食用含铁丰富的食物。
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 推荐食物 -->
                    <div class="text-sm font-medium mb-2">推荐食物</div>
                    <div class="grid grid-cols-2 gap-3">
                        <div class="bg-green-50 p-3 rounded-lg">
                            <div class="flex items-center mb-2">
                                <i class="fas fa-drumstick-bite text-green-600 mr-2"></i>
                                <div class="text-sm font-medium text-green-800">瘦牛肉</div>
                            </div>
                            <div class="text-xs text-green-700">富含优质蛋白质和铁</div>
                        </div>

                        <div class="bg-green-50 p-3 rounded-lg">
                            <div class="flex items-center mb-2">
                                <i class="fas fa-seedling text-green-600 mr-2"></i>
                                <div class="text-sm font-medium text-green-800">菠菜</div>
                            </div>
                            <div class="text-xs text-green-700">叶酸、铁的良好来源</div>
                        </div>

                        <div class="bg-green-50 p-3 rounded-lg">
                            <div class="flex items-center mb-2">
                                <i class="fas fa-fish text-green-600 mr-2"></i>
                                <div class="text-sm font-medium text-green-800">三文鱼</div>
                            </div>
                            <div class="text-xs text-green-700">富含DHA和优质蛋白</div>
                        </div>

                        <div class="bg-green-50 p-3 rounded-lg">
                            <div class="flex items-center mb-2">
                                <i class="fas fa-cheese text-green-600 mr-2"></i>
                                <div class="text-sm font-medium text-green-800">乳制品</div>
                            </div>
                            <div class="text-xs text-green-700">补充钙质和维生素D</div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 底部导航栏 -->
            <div class="nav-bar">
                <div class="nav-item">
                    <i class="fas fa-home text-xl mb-1"></i>
                    <span>首页</span>
                </div>
                <div class="nav-item active">
                    <i class="fas fa-notes-medical text-xl mb-1"></i>
                    <span>记录</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-book-medical text-xl mb-1"></i>
                    <span>知识库</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-user-friends text-xl mb-1"></i>
                    <span>伴侣空间</span>
                </div>
                <div class="nav-item">
                    <i class="fas fa-user text-xl mb-1"></i>
                    <span>我的</span>
                </div>
            </div>
        </div>
    </body>
</html>
